package com.jarvis.config.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jarvis.common.utils.PageUtils;
import com.jarvis.common.utils.Query;

import com.jarvis.config.dao.ConfigFormworkDao;
import com.jarvis.config.entity.ConfigFormworkEntity;
import com.jarvis.config.service.ConfigFormworkService;


@Service("configFormworkService")
public class ConfigFormworkServiceImpl extends ServiceImpl<ConfigFormworkDao, ConfigFormworkEntity> implements ConfigFormworkService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<ConfigFormworkEntity> page = this.page(
                new Query<ConfigFormworkEntity>().getPage(params),
                new QueryWrapper<ConfigFormworkEntity>()
        );

        return new PageUtils(page);
    }
    @Override
    public  ConfigFormworkEntity getFormwork(long formworkId){
        QueryWrapper<ConfigFormworkEntity> queryWrapper =  new QueryWrapper<ConfigFormworkEntity>().eq("id",formworkId);
        return this.baseMapper.selectOne(queryWrapper);
    }



}